<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        // 在Java中，&与&&完全相同,js中,不同
        function run() {
            var a = 3;
            var b = 4;
            var c = 5;
            console.log((a > b) && (a > c)); // 输出false
            console.log((a > b) && (a < c)); // 输出false
            console.log((a < b) && (a > c)); // 输出false
            console.log((a < b) && (a < c)); // 输出true
            console.log("----------------------------------------")
            console.log((a > b) & (a > c)); // 输出0  number 类型 
            console.log((a > b) & (a < c)); // 输出0
            console.log((a < b) & (a > c)); // 输出0
            console.log((a < b) & (a < c)); // 输出0
        }
        run();
    </script>
</body>

</html>